package com.example.joke.custom.indicator

import com.example.joke.base.navigationbar.AbsNavigationBar
import com.example.joke.databinding.ActivityIndicatorBinding
import com.example.joke.frame.BaseSkinActivity
import com.example.joke.frame.DefaultNavigationBar

class IndicatorActivity : BaseSkinActivity<ActivityIndicatorBinding>() {

    override fun setListener() {
    }

    override fun initData() {
        val list: MutableList<String> = mutableListOf()
        list.add("https://image2.ljcdn.com/test/c7ad88393adf91fe3ed71c35787416b7.jpg")
        list.add("https://image2.ljcdn.com/test/c7ad88393adf91fe3ed71c35787416b7.jpg")
        list.add("https://image2.ljcdn.com/test/c7ad88393adf91fe3ed71c35787416b7.jpg")
        list.add("https://image2.ljcdn.com/test/c7ad88393adf91fe3ed71c35787416b7.jpg")
        list.add("https://image2.ljcdn.com/test/c7ad88393adf91fe3ed71c35787416b7.jpg")

        binding.banner.setAutoPlay(false)
            .setIndicator(binding.indicator, false)
            .setAutoTurningTime(3000)
            .setPagerScrollDuration(200)
            .setHolderCreator(BannerHolderCreator())
            .setPages(list)

    }

    override fun initTitle() {
        DefaultNavigationBar.Builder(this)
            .setTitle("线型斜切指示器")
            .builder<AbsNavigationBar.Builder.AbsNavigationParams>()
    }

    override fun getBinding1(): ActivityIndicatorBinding {
        return ActivityIndicatorBinding.inflate(layoutInflater)
    }
}